package com.ftg.learn.chapter06.dao;

import com.ftg.learn.chapter04.demo.Student;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import javax.sql.DataSource;
import java.util.List;
import java.util.Map;

/**
 *
 * 目标类 : StudentDao 就是我们的切面要切的那个类  瓜
 *   StudentDaoProxy
 * @author kangjx
 * @date 2022/11/7
 */
@Repository
public class StudentDao {

    @Resource
    JdbcTemplate jdbcTemplate;

    public List<Map<String,Object>> showAll(){
        return this.jdbcTemplate.queryForList("select * from student");
    }


}
